package com.gzx.bi.modular.repayment.client.controller;

import com.gzx.bi.modular.repayment.client.bo.GzxRepaymentClientAddBo;
import com.gzx.bi.modular.repayment.client.bo.GzxRepaymentClientImportBo;
import com.gzx.bi.modular.repayment.client.bo.GzxRepaymentClientQueryBo;
import com.gzx.bi.modular.repayment.client.service.GzxRepaymentClientService;
import com.gzx.bi.modular.repayment.client.vo.GzxRepaymentClientVo;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.annotation.CommonLog;
import vip.xiaonuo.common.annotation.CommonNoRepeat;
import vip.xiaonuo.common.mvc.controller.BaseController;
import vip.xiaonuo.common.pojo.CommonResult;

/**
 * @author zjt
 * @description
 * @date 2025/4/2 11:15
 */
@RestController
@RequestMapping("/bi/repayment/clients")
public class GzxRepaymentClientController extends BaseController<GzxRepaymentClientAddBo, GzxRepaymentClientVo, GzxRepaymentClientQueryBo, GzxRepaymentClientService> {
    public GzxRepaymentClientController(GzxRepaymentClientService baseService) {
        super(baseService);
    }

    @CommonLog("导入甲方还款数据")
    @PostMapping("/importExcel")
    @CommonNoRepeat
    public CommonResult<Void> importExcel(@RequestPart("importBo") GzxRepaymentClientImportBo repaymentClientImportBo, @RequestPart("multipartFile") MultipartFile multipartFile) {
        baseService.importExcel(repaymentClientImportBo, multipartFile);
        return CommonResult.ok();
    }

}
